<#include "../common/_layout.html"/>
<@head title="乡镇名称管理">
<style type="text/css">
    .cll {
        background-color: #ddd;
    }
</style>
</@head>
<@layout menu='/towns'>
<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        ${pageTitleBread.department!pageTitleBread.default!}
    </h1>
    <ol class="breadcrumb">
        <li><a href="javascript:void(0);" onclick="location.href='${ctx}${pageTitleBread.breadHomeMethod!}'">首页</a></li>
        <li class="active">${pageTitleBread.nowBread!}</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <form action="${ctx}/towns" id="listForm" method="post" role="form">
                    <div class="box-header">
                        <h3 class="box-title">乡镇名称管理</h3>
                        <div class="box-tools">
                            <div class="input-group" style="width: 300px;">
                                <input name="name" id="name" class="form-control input-sm pull-right"
                                     placeholder="按联系人查询"   value="${name!}">
                                <div class="input-group-btn">
                                    <button class="btn btn-sm btn-default"><i class="fa fa-search"></i></button>
                                </div>
                            </div>
                        </div>
                    </div><!-- /.box-header -->
                    <div class="box-body table-responsive no-padding">
                        <button type="button" class="btn btn-default" onclick="location.href='${ctx}/towns/edit'">新增</button>
                        <button type="button" id="deleteButton" disabled="disabled" class="btn btn-default"
                                onclick="deleteAll('${ctx}/towns/delete')">删除
                        </button>
                        <table class="table table-hover">
                            <tr class="info">
                                <th title="id"><input type="checkbox" id="allCheck"></th>
                                <th title="名称">名称</th>
                                <th title="联系人">联系人</th>
                                <th title="联系方式">联系方式</th>
                                <th>编辑</th>
                            </tr>
                            <#list page.getList() as item>
                                <tr>
                                    <td><input type="checkbox" name="ids" value="${item.id!}"></td>
                                    <td>${item.name!}</td>
                                    <td>${item.linkman!}</td>
                                    <td>${item.phone!}</td>
                                    <td>
                                        <button type="button" class="btn btn-info"
                                                onclick="location.href='${ctx}/towns/edit?id=${item.id}'">编辑
                                        </button>
                                    </td>
                                </tr>
                            </#list>
                        </table>
                        <#if (page.list?size>0)>
                        <#include "../common/pager.html">
                        </#if>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
</@layout>
<@scripts>
<script type="text/javascript" src="${ctx}/adminlte/plugins/bootbox/bootbox.min.js"></script>
<script type="text/javascript" src="${ctx}/js/list.js"></script>
<script type="text/javascript">
    $(document).ready(function () {

    });
</script>
</@scripts>